package com.lhsy.djcloud.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.lhsy.djcloud.entity.NoticeMessage;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author wangzw
 * @since 2020-09-24
 */
public interface NoticeMessageService extends IService<NoticeMessage> {

    /**
     * 获取所有的接收未读消息
     * @param userId
     * @return
     */
    List<NoticeMessage> selectUnReadMessage(Integer userId,Integer type);
    List<NoticeMessage> selectUnReadMessage(Integer userId,List<Integer> types);
    List<NoticeMessage> selectMyMessage(Integer userId,Integer type,String params);

    /**
     * 获取所有的接收消息
     * @param userId
     * @return
     */
    List<NoticeMessage> selectMessage(Integer userId,Integer sendUserId, Integer type,String params);

    void delete(Integer id);

    /**
     * 获取指定用户发送的消息
     * @param userId
     * @param sendUserId
     * @param type
     * @return
     */
    List<NoticeMessage> selectUnReadMessage(Integer userId, Integer sendUserId, Integer type);

    /**
     *
     * @param userId
     * @param type
     * @return
     */
    List<NoticeMessage> selectAllMessage(Integer userId, Integer type);
}
